﻿@model GSOrganization.Application.SysPersonSettingInput
@{
    Layout = "~/Views/Shared/Create_Layout.cshtml";
}
<style>
    .layui-form { /*居中，文本框变短*/
        width: 38%;
        margin: 30px auto;
        text-align: center;
    }
</style>
<form class="layui-form" action="" lay-filter="layui">
    <div class="layui-form-item">
        <label class="layui-form-label required">用户名</label>
        <div class="layui-input-inline">
            <input type="text" name="LoginName" lay-verify="required" placeholder="登录使用的用户名" autocomplete="off" class="layui-input" value="@Html.DisplayFor(model => model.LoginName)" />
            <tip>登录使用的用户名</tip>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label required">姓名</label>
        <div class="layui-input-inline">
            <input type="text" name="ContactPerson" lay-verify="required" placeholder="请填写联系人姓名" autocomplete="off" class="layui-input" value="@Html.DisplayFor(model => model.ContactPerson)" />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label required">电话</label>
        <div class="layui-input-inline">
            <input type="text" name="ContactPhone" lay-verify="required" placeholder="请填写联系人电话" autocomplete="off" class="layui-input" value="@Html.DisplayFor(model => model.ContactPhone)" />
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button lay-submit lay-filter="formsubmit" class="common_btn" id="submit">确认保存</button>

        </div>
    </div>
</form>
<script src="~/js/verifyRules.js" type="text/javascript"></script>
<script src="~/js/jsencrypt.min.js"></script>
<input id="pxkey" type="button" hidden="hidden" value="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCLqzqTeRC4uoRx2R61hda7Y82R
TKH2bWlgWigXaz3t337p3z47jJ4c/klQOIY5XTcxf1n+nzyd5QdJLy7KX76Izg0M
MRNg8TIzjFyQqbh6P2Hx6zqh0N9SSIF9HvUcJ7XuzMQc1E1te0d9gLOG7pO58l3a
r8UYG0t3uLnqlC64mwIDAQAB" />

<script>
    $(function() {

        layui.use(['jquery', 'layer', 'miniTab'], function() {
            var form = layui.form,
                miniTab = layui.miniTab;


            //监听提交
            form.on('submit(formsubmit)', function(data) {

                var entity = data.field;
                var url = '/SysPerson/Setting'



                var data = ajaxPost(url, entity);

                if (data.code == 200) {
                    layer.alert(data.msg, {
                        title: "信息修改成功"
                    });
                    //关闭当前tab页面
                    setTimeout(function() {
                        miniTab.delete(url, true);
                      }, 4000);

                    } else {
                    layer.alert(data.msg, {
                        title: "失败"
                    });
                }

                return false;
            });
        });

    })




</script> 